#include <iostream>
#include <vector>
#include <algorithm>

int main() {
    int n;
    std::cin >> n;
    std::vector<int> ropes(n);

    for (int i = 0; i < n; ++i) {
        std::cin >> ropes[i];
    }

    std::sort(ropes.begin(), ropes.end());

    double length = ropes[0];

    for (int i = 1; i < n; ++i) {
        length = (length + ropes[i]) / 2;
    }

    std::cout << (int)(length) << std::endl;

    return 0;
}    